//
// Created by ZLY on 2025/5/10.
//

#ifndef SPAWNER_H
#define SPAWNER_H

#include "core/object.h"
class Player;

class Spawner : public Object {
protected:
    int num_ = 20;
    float timer_ = 0;
    float interval_ = 3.0f;
    Player *target_;

public:
    int getNum() { return num_; }
    float getTimer() { return timer_; }
    float getInterval() { return interval_; }
    Player *getTarget() { return target_; }
    void setNum(int num) { num_ = num; }
    void setTimer(float timer) { timer_ = timer; }
    void setInterval(float interval) { interval_ = interval; }
    void setTarget(Player *target) { target_ = target; }


    void update(float dt) override;
};


#endif //SPAWNER_H
